<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Touch
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: UtilityController.php 2011-04-26 11:18:13 mirlan $
 * @author     Mirlan
 */

/**
 * @category   Application_Extensions
 * @package    Touch
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 */

class Touch_UtilityController extends Core_Controller_Action_Standard {
	
	public function init() {
		// Smoothbox Operation
		$this->view->smoothboxClose = $this->_getParam ( 'smoothboxClose', false );
		$this->view->smoothboxCloseTime = $this->_getParam ( 'smoothboxCloseTime' );
		$this->view->redirect = $this->_getParam ( 'redirect', false );
		$this->view->redirectTime = $this->_getParam ( 'redirectTime' );
		
		//Ajax Operation
		$this->view->parentRefresh = $this->_getParam ( 'parentRefresh', false );
		$this->view->parentRefreshTime = $this->_getParam ( 'parentRefreshTime' );
		$this->view->parentRedirect = $this->_getParam ( 'parentRedirect', false );
		$this->view->parentRedirectTime = $this->_getParam ( 'parentRedirectTime' );
		
		//location Operation
		$this->view->locationHref = $this->_getParam ( 'locationHref', false );
		$this->view->locationHrefTime = $this->_getParam ( 'locationHrefTime' );
		$this->view->locationReload = $this->_getParam ( 'locationReload', false );
		$this->view->locationReloadTime = $this->_getParam ( 'locationReloadTime' );
	}
	
	public function successAction() {
		// Get messages
		$messages = array ();
		$messages = array_merge ( $messages, ( array ) $this->_getParam ( 'messages', null ) );
		
		// Default message "success"
		if (empty ( $messages )) {
			$messages [] = Zend_Registry::get ( 'Zend_Translate' )->_ ( 'Success' );
		}
		
		//Assign
		$this->view->messages = $messages;
		$this->view->status = ($this->_getParam ( 'status', true )) ? 1 : 0;
	}
	
	public function simpleAction() {
	
	}
}